<div id="main">
    <div id="contents">
        <form method="post" action="#" name="filters">
            <fieldset>
                <legend>
                    <label sid="usb.shareHost"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" cellspacing="0" cellpadding="0" border="0" width="100%">
                        <tbody>
                        <tr>
                            <td class="frame_tab_right">
                                <input id="id2371" type="text" size="20" name="id2371">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
            <fieldset>
                <legend>
                    <label sid="usb.accessMethod"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" cellspacing="0" cellpadding="0" border="0" width="100%">
                        <tbody>
                        <tr>
                            <th>
                                <label sid="usb.smbenable"></label>
                            </th>
                            <th>
                                <label sid="usb.accessMethod"></label>
                            </th>
                            <th>
                                <label sid="usb.accessURL"></label>
                            </th>
                            <th>
                                <label sid="usb.userName"></label>
                            </th>
                            <th>
                                <label sid="usb.password"></label>
                            </th>
                        </tr>
                        <tr>
                            <td>
                                <input id="id2368" type="checkbox" value="0" name="id2368">
                            </td>
                            <td>
                                <label sid="usb.networkAccess"></label>
                            </td>
                            <td>
                                <span id="networkAccess"></span>
                            </td>
                            <td>
                                <span></span>
                            </td>
                            <td>
                                <span></span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input id="id2375" type="checkbox" value="0" name="id2375">
                            </td>
                            <td>
                                <label sid="usb.httpAccess"></label>
                            </td>
                            <td>
                                <span id="httpAccess"></span>
                            </td>
                            <td>
                                <input type="text" name="id2376" id="id2376" size="10"/>
                            </td>
                            <td>
                                <input type="text" name="id2377" id="id2377" size="10"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
            <fieldset>
                <legend>
                    <label sid="usb.networkFolders"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" cellspacing="0" cellpadding="0" border="0" width="100%">
                        <tbody>
                        <tr>
                            <th>
                                <label sid="usb.shareName"></label>
                            </th>
                            <th>
                                <label sid="usb.smbWritable"></label>
                            </th>
                            <th> </th>
                        </tr>
                        <tr>
                            <td>
                                <span id="shareName"></span>
                            </td>
                            <td>
                                <span id="writable"></span>
                            </td>
                            <td>
                                <a onclick="edits();" style="cursor:pointer">
                                    <img src="images/edit.gif" style="border: none;"/>
<!--
                                <input class="button" style="border: none" type="image" src="images/edit.gif" sid="sbutton.modify"/>
-->
                                    <label sid="sbutton.modify"></label>
                                </a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
            <fieldset id="edit_tab" style="display: none;">
                <legend>
                    <label sid="usb.edit"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" cellspacing="0" cellpadding="0" border="0" width="100%">
                        <tbody>
                        <tr>
                            <td class="frame_tab_left">
                                <label sid="usb.shareName"></label>
                            </td>
                            <td class="frame_tab_right">
                                <input id="id2373" type="text" size="20" name="id2373">
                            </td>
                        </tr>
                        <tr>
                            <td class="frame_tab_left">
                                <label sid="usb.userName"></label>
                            </td>
                            <td class="frame_tab_right"> admin </td>
                        </tr>
                        <tr>
                            <td class="frame_tab_left">
                                <label sid="usb.password"></label>
                            </td>
                            <td class="frame_tab_right">
                                <input id="id2370" type="password" size="20" name="id2370">
                            </td>
                        </tr>
                        <tr>
                            <td class="frame_tab_left">
                                <label sid="usb.smbWritable"></label>
                            </td>
                            <td class="frame_tab_right">
                                <input id="id2374_1" type="radio" value="yes" name="id2374">
                                <label sid="wireless.allow"></label>
                                <span style="padding-left: 20px;"></span>
                                <input id="id2374_2" type="radio" value="no" name="id2374">
                                <label sid="wireless.reject"></label>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
                    <div class="submitFooter">
                        <script type="text/javascript">
                            var buttonInfo = submitFooterButton(1,0);
                            $(".submitFooter").html(buttonInfo);
                        </script>
                    </div>
                </form>
            </div>
</div>
        <br/>
<div id="helpContainer">
            <div id="help">
                <div><h2><img src="images/help_title.png" border="0"/><label sid="share.help"></label></h2></div>
                <div id="helpBody">
                <dl>

                    <dt class="term"><label sid="usb.accessMethod"></label></dt>
                    <dd class="definition">
                        <label sid="usb.networkAccess"></label><br/>
                        <label sid="usb.networkAccess_note"></label><br/><br/>
                        <label sid="usb.httpAccess"></label><br/>
                        <label sid="usb.httpAccess_note"></label></dd>
                    <dt class="term"><label sid="usb.accessURL"></label></dt>
                    <dd class="definition"><label sid="usb.accessURL_note"></label></dd>
                    <dt class="term"><label sid="usb.edit"></label></dt>
                    <dd class="definition">
                        <label sid="usb.smbWritable"></label><br/>
                        <label sid="usb.smbWritable_note"></label></dd>
                    
                </dl>
                </div>
            </div>
</div>


<script type="text/javascript">
    $(document).ready(function(){
        load_html();
    });
    function edits(){
        $("#edit_tab").show();
    }
    var nonames = new Array("submit","edit");
    function load_html(){
    $("#edit_tab").hide();

        var sendtext = "&id=2368&id=2369&id=2370&id=2371&id=2372&id=2373&id=2374&id=2375&id=2376&id=2377";
        DataRequest("get_json",sendtext,function(data){
        getResult(nonames,data);
        var shareHost = data["id2371"];
        var shareName = data["id2373"];
        var URL_name = "\\\\"+shareHost+"\\"+shareName;
        var networkURL = "\\\\"+shareHost;
        var httpURL = "http://w.com/usb/";
        if(data["id2374"]=="yes"){
         var writable = wireless.allow;
            $("#id2374_1").attr("checked",true);
        }else{
            var writable = wireless.reject;
            $("#id2374_2").attr("checked",true);
        }
        $("#networkAccess").html(networkURL);
        $("#httpAccess").html("<a href='"+httpURL+"'>"+httpURL+"</a>");
        $("#shareName").html(URL_name);
        $("#writable").html(writable);
    });
    }

    $("[name=submit]").click(function () {
        $(".errormsg").html('');
        var settext = getSetText(nonames);
        settext+="&id2369=root";
        if($("#id2374_1").attr("checked")){
           settext+="&id2374=yes";
        } else{
            settext+="&id2374=no";
        }
        settext=settext.replace(/\#/g,"%23");
        submitform(modules["set_data"],settext);
        setTimeout("load_html()",2000);
    });

</script>
